<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    let price=212;
    price = Math.round(price * 100) / 100;
    let s = price.toString();
    console.log(s);
    let rs = s.indexOf(".");
    console.log(rs);
    if (rs < 0) {
            rs = s.length;
            s += ".";
        }
        while (s.length <= rs + 2) {
            s += "0";
        }
    console.log(s);
    
    
</script>
</html>